import { createApp } from 'vue'
import './style.css'
import "@/styles/variable.css"
import App from './App.vue'
import 'element-plus/dist/index.css'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn' //国际化的配置
import router from './router'
import pinia from './stores'
import "./perminsstion"
//svg插件需要的配置代码
import 'virtual:svg-icons-register'
const app = createApp(App)
//将我自己封装的图表组件注册为全局组件
import gloalComponent from "@/components/index.ts"
//引入暗黑模式的样式
import 'element-plus/theme-chalk/dark/css-vars.css'
app.use(gloalComponent)
//将element-plus中的图标注册为全局组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.use(router).use(pinia).use(ElementPlus, { locale: zhCn }).mount('#app')
